import axios from './axios';
import qs from 'qs'

export function getQuestList() {
    return axios.get('/parts_purchase_application/manage/parts_purchase_application_list.do').then(res=>Promise.resolve(res.data))
}

export function getQuestDetail(id) {
    return axios.post('/parts_purchase_application/manage/parts_purchase_application_record_detail.do',qs.stringify({id:id})).then(res=>Promise.resolve(res.data))
}

export function addQuest(quest) {
    return axios.post('/parts_purchase_application/manage/save_parts_purchase_application.do',qs.stringify(quest)).then(res=>Promise.resolve(res.data))
}
export function confirmQuest(quest) {
    return axios.post('/parts_purchase_application/manage/confirm_parts_purchase_application.do',qs.stringify(quest)).then(res=>Promise.resolve(res.data))
}

export function approveQuest(id,status) {
    return axios.post('/parts_purchase_application/manage/overrule.do',qs.stringify({id,status})).then(res=>Promise.resolve(res.data))
}